how to use variables in HTML

136

html variables -

<script>var screenWidth = screen.width;</script> 
...
<img src="images/title.png" onload="this.width=screenWidth;" style="margin-top: 3%">

how to use variables in HTML -

<!DOCTYPE html>
<html>
   <head>
      <title>HTML var Tag</title>
   </head>
   <body>
      <p>The equations: <var>2x</var> - <var>4z</var> = <var>2y</var> + 3 and
         <var>x</var> + <var>5z</var> = <var>3y</var> + 6</p>
   </body>
</html>

Comments

Submit
0 Comments